
import java.awt.Image;
import java.awt.image.BufferedImage;


// Project: 

/******************************************************************************
 * <p>
 * File: tileObject.java
 * </p>
 * @author  Tadhg O'Sullivan, rogue
 * @author <a href="mailto:tadhg.osullivan@ucdconnect.ie">tadhg.osullivan@ucdconnect.ie</a>
 * @version 1.0, 2007
 * @created 20-Feb-07 5:54:57 PM
 * @revised 21-Feb-07
 * Copyright 2007 Tadhg O'Sullivan
 * <p>
 * Description: Create a tileObject, holds a BufferedImage, a unique int ,
 *  and its x y coordinates.
 * </p>
 *  <p>
 *  This file is part of Retribution.
 *  </p>
 *  <p>
 *  Retribution is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  Retribution is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Retribution; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *  <p>
 *****************************************************************************/

public class tileObject {
	
	protected BufferedImage img; // the image for the tile
	protected Image iImg;
	protected int num; // the number assigned to the tile
	protected int posx; // tile coordinates
	protected int posy; // tile coordinates
	
	/**
	 * @param i The BufferedImage for the tile
	 * @param n The number used to reference the tile
	 * @param x The x coordinate of the tile
	 * @param y The y coordinate of the tile
	 */
	public tileObject(BufferedImage i, int n,int x, int y){
		this.img = i;
		this.num = n;
		this.posx = x;
		this.posy = y;
	}
	
	// getter methods
	/**
	 * @return img The BufferedImage tile
	 */
	public BufferedImage getBufferedImage(){
		return img;
	}
	
	public Image getImage(){
		return iImg;
	}
	
	/**
	 * @return num The int used to reference the tile
	 */
	public int getNum(){
		return num;
	}
	
	/**
	 * @return posx The x coordinate of the tile
	 */
	public int getX(){
		return posx;
	}
	
	/**
	 * @return posy The y coordinate of the tile
	 */
	public int getY(){
		return posy;
	}
	
	// setter methods
	/**
	 * @param i The BufferedImage for the tile
	 */
	public void setImage(BufferedImage i){
		this.img = i;
	}
	
	public void setImage(Image i){
		this.iImg = i;
	}
	
	/**
	 * @param n The reference number to the tile
	 */
	public void setNum(int n){
		this.num = n;
	}
	
	/**
	 * @param x The x coordinate for the tile
	 */
	public void setX(int x){
		this.posx = x;
	}
	
	/**
	 * @param y The y coordinate for the tile
	 */
	public void setY(int y){
		this.posy = y;
	}
}
